home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC-SIG: World of Games
/
PC-SIG World of Games (CDRM1080710) (1993).iso
/
ENT
/
DISK3466.ZIP
/
SHAPE.ZIP
/
DEMO.BAS
next >
Wrap
BASIC Source File
|
1991-12-07
|
12KB
|
284 lines
'
' DEMO.BAS
'
' This is QuickBasic (tm) source code to demonstrate how easy it is to
' use the data generated by SHAPE SHOOTER's GEN DATA option in your own
' programs.
'
DEFINT A-Z 'Treat variables as INTEGER by default
CONST DELAY = 5000 'This demo was created on a 40MHz 80386
'so you may want to change the DELAY constant
'
' Dimension arrays to hold shape data for three cowboy frames (TEX1, TEX2,
' and TEX3). The arrays must be of type LONG integer.
'
' We know to dimension them with at least 385 elements (0 -384) since
' SHAPE SHOOTER gives us this information in the frame comment before
' each block of DATA statements (ELEM: 385).
'
DIM SHARED TEX1(384) AS LONG
DIM SHARED TEX2(384) AS LONG
DIM SHARED TEX3(384) AS LONG
'
' Now we read the data from DATA statements into the three arrays
'
FOR I = 0 TO 384
READ TEX1(I)
NEXT I
FOR I = 0 TO 384
READ TEX2(I)
NEXT I
FOR I = 0 TO 384
READ TEX3(I)
NEXT I
'
' Next we enter high resoulution VGA screen mode 12
'
SCREEN 12
CLS
PRINT TAB(25); "SHAPE SHOOTER DEMO PROGRAM"
TexFlag = 0
FOR XY = 0 TO 200 'Loop to move Tex from (0,0) to (200,200)
'We will only change between TEX1 shape and
'TEX2 shape when we have moved at least 6
'locations using one shape.
IF TexFlag < 6 THEN 'We will use TEX1.
PUT (XY, XY), TEX1 'Put TEX1 shape on screen at XY,XY.
FOR I = 1 TO DELAY 'Wait around so we get to see it.
NEXT I
TexFlag = TexFlag + 1 'Record number of times same shape is used.
PUT (XY, XY), TEX1 'Put TEX1 in same spot to erase it (XOR).
ELSE
PUT (XY, XY), TEX2 'We will use TEX2.
FOR I = 1 TO DELAY 'Wait around so we get to see it.
NEXT I
TexFlag = TexFlag + 1 'Record number of times same shape is used.
IF TexFlag > 12 THEN 'Done with TEX2...
TexFlag = 0 ' ...Prepare for TEX1
SOUND 50, 2 / 10 'Sound of one footstep.
END IF
PUT (XY, XY), TEX2 'Put TEX2 in same spot to erase it (XOR).
END IF
IF TexFlag = 6 THEN SOUND 100, 2 / 10 'Sound of other footstep.
SaveXY = XY 'Remember last x,y location.
NEXT XY
PUT (SaveXY, SaveXY), TEX3 'Draw TEX3 (shooting)
FOR I = 800 TO 37 STEP -2 'Make a little noise.
SOUND I, I / 10000
NEXT I
END
'
' These are the DATA statements generated by SHAPE SHOOTER's GEN DATA
' option (F8).
' Note the FILE comment is used to create a label (DEMODATA:) and the
' FRAME comment is placed before each block of shape data, along with
' the number of elements that make up the shape (i.e. ELEM: 385). Also
' provided, is the X, Y frame size. (This can be changed in SHAPE SHOOTER
' by pressing shift-F1)
'
DEMODATA:
'TEX1.WOW ELEM: 385 X: 64 Y: 48
DATA 3145792 , 0 , 0 , 570425344 , 0 , 570425344
DATA 0 , 570425344 , 0 , 0 , 0 , 905969664
DATA 0 , 905969664 , 0 , 905969664 , 0 , 0
DATA 0 , 2130706432 , 0 , 2130706432 , 0 , 2130706432
DATA 0 , 0 , 0 , 2130706432 , 0 , 2130706432
DATA 0 , 2130706432 , 0 , 0 , 0 , 2130706432
DATA 0 , 2130706432 , 0 , 2130706432 , 0 , 0
DATA 0 ,-10485760 , 131 ,-10485760 , 131 ,-10485760
DATA 131 , 0 , 0 ,-13107200 , 142 ,-13107200
DATA 142 ,-13107200 , 142 , 0 , 0 ,-15794176
DATA 248 ,-15794176 , 248 ,-15794176 , 248 , 0
DATA 0 ,-16580608 , 224 ,-16580608 , 224 ,-16580608
DATA 224 , 1040187392 , 0 , 1040187392 , 0 , 1040187392
DATA 0 , 1040187392 , 0 , 1040187392 , 0 , 1040187392
DATA 0 , 1040187392 , 0 , 1040187392 , 0 , 469762048
DATA 0 , 469762048 , 0 , 469762048 , 0 , 469762048
DATA 0 , 469762048 , 0 , 469762048 , 0 , 469762048
DATA 0 , 469762048 , 0 , 469762048 , 30 , 0
DATA 0 , 0 , 0 , 469762048 , 30 ,-16580608
DATA 49407 , 0 , 0 , 0 , 0 ,-16580608
DATA 49407 ,-15794176 , 57599 , 0 , 0 , 0
DATA 0 ,-15794176 , 57599 ,-12648448 , 61681 , 0
DATA 0 , 0 , 0 ,-12648448 , 61681 ,-8454144
DATA 28864 , 0 , 0 , 0 , 0 ,-8454144
DATA 28864 ,-262144 , 14464 , 0 , 0 , 0
DATA 0 ,-262144 , 14464 ,-1048576 , 14464 , 0
DATA 0 , 0 , 0 ,-1048576 , 14464 ,-2096896
DATA 63616 , 393216 , 49152 , 393216 , 49152 ,-2096896
DATA 63616 ,-4193536 , 28800 , 470220800 , 24576 , 470220800
DATA 24576 ,-473955584 , 28800 , 1048576768 , 61440 , 1040384000
DATA 61440 , 1040384000 , 61440 , 8389376 , 61440 , 469763840
DATA 28672 ,-16579072 , 28800 ,-16579072 , 28800 , 198400
DATA 28672 , 3840 , 0 ,-16576768 , 128 ,-16576768
DATA 128 , 200448 , 0 , 1024 , 0 ,-16579584
DATA 128 ,-16579584 , 128 , 197632 , 0 , 0
DATA 0 ,-16580608 , 224 ,-16580608 , 224 , 131072
DATA 0 , 0 , 0 ,-15794176 , 248 ,-15794176
DATA 248 , 0 , 0 , 0 , 0 ,-2145452032
DATA 120 ,-2145452032 , 120 , 0 , 0 , 0
DATA 0 , 8323072 , 124 , 8323072 , 124 , 0
DATA 0 , 0 , 0 , 16646144 , 30 , 16646144
DATA 30 , 0 , 0 , 0 , 0 , 16253184
DATA 31 , 16253184 , 31 , 0 , 0 , 0
DATA 0 , 15728896 , 15 , 15728896 , 15 , 0
DATA 0 , 0 , 0 , 16253184 , 15 , 16253184
DATA 15 , 0 , 0 , 0 , 0 , 16252928
DATA 32775 , 16252928 , 32775 , 0 , 0 , 0
DATA 0 , 8126464 , 32775 , 8126464 , 32775 , 0
DATA 0 , 0 , 0 , 4063232 , 32775 , 4063232
DATA 32775 , 0 , 0 , 0 , 0 , 2031616
DATA 15 , 2031616 , 15 , 0 , 0 , 0
DATA 0 , 983040 , 15 , 983040 , 15 , 0
DATA 0 , 0 , 0 , 1966080 , 31 , 1966080
DATA 31 , 0 , 0 , 0 , 0 , 4063232
DATA 30 , 4063232 , 30 , 0 , 0 , 0
DATA 0 , 3670016 , 62 , 3670016 , 62 , 0
DATA 0 , 0 , 0 , 0 , 124 , 0
DATA 124 , 0 , 0 , 0 , 0 , 0
DATA 248 , 0 , 248 , 0 , 0 , 0
DATA 0 , 0 , 240 , 0 , 240 , 0
DATA 0 , 0 , 0 , 0 , 248 , 0
DATA 248 , 0 , 0 , 0 , 0 , 0
DATA 60 , 0 , 60 , 0 , 0 , 0
DATA 0 , 0 , 30 , 0 , 30 , 0
DATA 0
'TEX2.WOW ELEM: 385 X: 64 Y: 48
DATA 3145792 , 0 , 0 , 0 , 136 , 0
DATA 136 , 0 , 136 , 0 , 0 , 0
DATA 216 , 0 , 216 , 0 , 216 , 0
DATA 0 , 16777216 , 252 , 16777216 , 252 , 16777216
DATA 252 , 0 , 0 , 16777216 , 252 , 16777216
DATA 252 , 16777216 , 252 , 0 , 0 ,-2097086464
DATA 3326 ,-2097086464 , 3326 ,-2097086464 , 3326 , 0
DATA 0 ,-486539264 , 14590 ,-486539264 , 14590 ,-486539264
DATA 14590 , 0 , 0 , 1056964608 , 57599 , 1056964608
DATA 57599 , 1056964608 , 57599 , 0 , 0 , 251658240
DATA 33023 , 251658240 , 33023 , 251658240 , 33023 , 0
DATA 248 , 0 , 248 , 0 , 248 , 0
DATA 248 , 0 , 248 , 0 , 248 , 0
DATA 248 , 0 , 248 , 0 , 112 , 0
DATA 112 , 0 , 112 , 0 , 112 , 0
DATA 112 , 0 , 112 , 0 , 112 , 0
DATA 112 ,-268435456 , 112 , 0 , 0 , 0
DATA 0 ,-268435456 , 112 ,-16318464 , 33023 , 0
DATA 0 , 0 , 0 ,-16318464 , 33023 ,-15794176
DATA 57599 , 0 , 0 , 0 , 0 ,-15794176
DATA 57599 , 522125312 , 63743 , 0 , 0 , 0
DATA 0 , 522125312 , 63743 , 119275520 , 64767 , 0
DATA 0 , 0 , 0 , 119275520 , 64767 , 54001664
DATA 32510 , 0 , 0 , 0 , 0 , 54001664
DATA 32510 , 54001664 , 7934 , 0 , 0 , 0
DATA 0 , 54001664 , 7934 , 54394880 , 4094 , 403046400
DATA 0 , 403046400 , 0 , 54394880 , 4094 , 52166656
DATA 8390654 , 470548480 , 112 , 470548480 , 112 , 52166656
DATA 8390542 , 1966080 , 8389624 , 203292672 , 248 , 203292672
DATA 248 , 1966080 , 8389376 , 1835008 , 12583280 , 253493248
DATA 12583166 , 253493248 , 12583166 , 203161600 , 12583168 , 0
DATA 14680320 , 251658240 , 14680574 , 251658240 , 14680574 , 201326592
DATA 14680320 , 0 , 4194304 , 251658240 , 4194558 , 251658240
DATA 4194558 , 201326592 , 4194304 , 0 , 0 , 251658240
DATA 255 , 251658240 , 255 , 67108864 , 0 , 0
DATA 0 , 1056964608 , 57599 , 1056964608 , 57599 , 0
DATA 0 , 0 , 0 , 1006632960 , 61443 , 1006632960
DATA 61443 , 0 , 0 , 0 , 0 , 2080374784
DATA 64513 , 2080374784 , 64513 , 0 , 0 , 0
DATA 0 ,-268435456 , 65024 ,-268435456 , 65024 , 0
DATA 0 , 0 , 0 ,-268369920 , 16128 ,-268369920
DATA 16128 , 0 , 0 , 0 , 0 ,-536805376
DATA 7936 ,-536805376 , 7936 , 0 , 0 , 0
DATA 0 ,-536805376 , 16128 ,-536805376 , 16128 , 0
DATA 0 , 0 , 0 ,-1073545216 , 15872 ,-1073545216
DATA 15872 , 0 , 0 , 0 , 0 ,-1073545216
DATA 31744 ,-1073545216 , 31744 , 0 , 0 , 0
DATA 0 ,-1073545216 , 63488 ,-1073545216 , 63488 , 0
DATA 0 , 0 , 0 ,-536805376 , 61441 ,-536805376
DATA 61441 , 0 , 0 , 0 , 0 ,-536805376
DATA 57345 ,-536805376 , 57345 , 0 , 0 , 0
DATA 0 ,-268369920 , 61440 ,-268369920 , 61440 , 0
DATA 0 , 0 , 0 ,-268435456 , 63488 ,-268435456
DATA 63488 , 0 , 0 , 0 , 0 ,-134217728
DATA 14336 ,-134217728 , 14336 , 0 , 0 , 0
DATA 0 , 2080374784 , 0 , 2080374784 , 0 , 0
DATA 0 , 0 , 0 , 1040187392 , 0 , 1040187392
DATA 0 , 0 , 0 , 0 , 0 , 503316480
DATA 0 , 503316480 , 0 , 0 , 0 , 0
DATA 0 , 1040187392 , 0 , 1040187392 , 0 , 0
DATA 0 , 0 , 0 , 2013265920 , 0 , 2013265920
DATA 0 , 0 , 0 , 0 , 0 ,-268435456
DATA 0 ,-268435456 , 0 , 0 , 0 , 0
DATA 0 ,-536870912 , 0 ,-536870912 , 0 , 0
DATA 0
'TEX3.WOW ELEM: 385 X: 64 Y: 48
DATA 3145792 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 248 , 0 , 248 , 0 , 248 , 0
DATA 0 , 0 , 248 , 0 , 248 , 0
DATA 248 , 0 , 0 , 16777216 , 252 , 16777216
DATA 252 , 16777216 , 252 , 0 , 0 , 16777216
DATA 252 , 16777216 , 252 , 16777216 , 252 , 0
DATA 0 ,-2097086464 , 7422 ,-2097086464 , 7422 ,-2097086464
DATA 7422 , 0 , 0 ,-486539264 , 28926 ,-486539264
DATA 28926 ,-486539264 , 28926 , 0 , 0 , 1056964608
DATA 57599 , 1056964608 , 57599 , 1056964608 , 57599 , 0
DATA 0 , 251658240 , 33023 , 251658240 , 33023 , 251658240
DATA 33023 , 0 , 248 , 0 , 248 , 0
DATA 248 , 0 , 248 , 0 , 248 , 0
DATA 248 , 0 , 248 , 0 , 248 , 0
DATA 112 , 0 , 112 , 0 , 112 , 0
DATA 112 , 0 , 112 , 0 , 112 , 0
DATA 112 , 0 , 112 , 0 , 112 , 0
DATA -1071710208 , 0 ,-1071710208 , 0 ,-1073282960 , 16777216
DATA 6291704 , 0 ,-2139160576 , 0 ,-2139160576 , 16777216
DATA -2140733192 , 50331648 , 15729150 , 0 , 7340032 , 0
DATA 7340032 , 50331648 , 15729150 , 117440512 , 15779823 , 0
DATA 7340032 , 0 , 7340032 , 117440512 , 15779823 , 251658240
DATA 8454135 , 0 , 0 , 0 , 0 , 251658240
DATA 8454135 , 486539264 , 64763 , 0 , 0 , 0
DATA 0 , 486539264 , 64763 , 218103808 , 12540 , 0
DATA 0 , 0 , 0 , 218103808 , 12540 , 218103808
DATA 252 , 0 , 0 , 0 , 0 , 218103808
DATA 252 , 83886080 , 252 , 0 , 0 , 0
DATA 0 , 83886080 , 252 , 0 , 0 , 0
DATA 0 , 0 , 0 , 0 , 0 , 0
DATA 0 , 16777216 , 252 , 16777216 , 252 , 0
DATA 0 , 0 , 0 , 50331648 , 252 , 50331648
DATA 252 , 0 , 0 , 0 , 0 , 50331648
DATA 61695 , 50331648 , 61695 , 0 , 0 , 0
DATA 0 , 50331648 , 63743 , 50331648 , 63743 , 0
DATA 0 , 0 , 0 , 50331648 , 64767 , 50331648
DATA 64767 , 0 , 0 , 0 , 0 , 50331648
DATA 31968 , 50331648 , 31968 , 0 , 0 , 0
DATA 0 , 50331648 , 15584 , 50331648 , 15584 , 0
DATA 0 , 0 , 0 , 16777216 , 15584 , 16777216
DATA 15584 , 0 , 0 , 0 , 0 , 16777216
DATA 15584 , 16777216 , 15584 , 0 , 0 , 0
DATA 0 , 16777216 , 14560 , 16777216 , 14560 , 0
DATA 0 , 0 , 0 , 17760256 , 30960 , 17760256
DATA 30960 , 0 , 0 , 0 , 0 ,-519110656
DATA 30960 ,-519110656 , 30960 , 0 , 0 , 0
DATA 0 ,-14745600 , 28912 ,-14745600 , 28912 , 0
DATA 0 , 0 , 0 ,-15794176 , 63728 ,-15794176
DATA 63728 , 0 , 0 , 0 , 0 , 521076736
DATA 65264 , 521076736 , 65264 , 0 , 0 , 0
DATA 0 , 50790400 , 65504 , 50790400 , 65504 , 0
DATA 0
'
'
' Microsoft is a registered trademark and QuickBasic is a trademark
' of Microsoft Corporation.